// 延迟执行在装饰器中的实现
{

  const delayDecorator: MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {
    const method = descriptor.value

    descriptor.value = () => {
      setTimeout(method, 2000)
    }
  }

  class Demo {
    @delayDecorator
    public response() {
      console.log('delay message');
    }
  }

  new Demo().response()

}